This invention relates generally to computer graphics systems and more specifically to initialization and updating of a display z buffer. The z buffer is a depth buffer which holds a value associated with the depth of each pixel on a display screen and is generally used to remove hidden surfaces or lines when rendering 3-D solids on a display. Conventional z buffers include one word associated with each displayed pixel. The present invention is a method of improving both the initialization and updating functions associated with the z buffer. More particularly, pixels are grouped together in blocks and a status word (za) is associated with each block. This status word contains the maximum value of any pixel within the block. It should be noted that maximum value refers to maximum depth of a pixel within a display screen, i.e. the maximum distance from the eye of a viewer to the pixel.
Conventional z buffers initialize each pixel position individually when clearing the z buffer, and updating the z buffer for new values. That is, at initialization each pixel is set to a z max value such that any new z value will be closer to a viewer of the display than the z max value. Therefore, any subsequent z value will "win" when compared to z max.
To update the z buffer of conventional systems, the existing value in the z buffer for each pixel is compared with the new z value to be written to the same pixel. If the new z value is less than the value currently in the z buffer for that pixel, then the new z value replaces the existing value in the z buffer. In this manner, pixels representing objects closer to a viewer of the display are maintained in the z buffer and objects further from the viewer are obscured. If the existing value in the z buffer is less than the new value for the object being displayed then the existing value remains in the z buffer. This procedure is applied to each pixel of each scan converted object until the entire scene is rendered.